package com.gosling.cloudspace.mapper;

import com.gosling.cloudspace.common.entity.pojo.UserInfoPO;
import com.gosling.cloudspace.config.mybatis.BaseMapperX;
import com.gosling.cloudspace.config.mybatis.LambdaQueryWrapperX;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

/**
 * @email 1793327033@qq.com
 * @classname UserInfoMapper
 * @author: osc_lihonglin
 * @date: 2021/6/24 9:55
 */
@Mapper
@Repository
public interface UserInfoMapper extends BaseMapperX<UserInfoPO> {

    default UserInfoPO byUserId(String userId) {
        LambdaQueryWrapperX<UserInfoPO> wrapper = new LambdaQueryWrapperX<>();
        wrapper.eq(UserInfoPO::getUserId, userId);
        return selectOneX(wrapper);
    }
}







